package com.sdx.console.base.entity;

import java.util.Date;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;

import com.fasterxml.jackson.annotation.JsonIgnore;
import org.beetl.sql.core.annotatoin.ColumnIgnore;
import org.beetl.sql.core.annotatoin.AutoID;
import org.beetl.sql.core.annotatoin.SeqID;
import org.apache.commons.lang3.StringUtils;
import com.ibeetl.admin.core.util.ValidateConfig;
import com.sdx.service.ConfigService;

import org.beetl.sql.core.TailBean;
import java.math.*;

import com.ibeetl.admin.core.annotation.Dict;
import com.ibeetl.admin.core.entity.BaseEntity;

import org.beetl.sql.core.annotatoin.InsertIgnore;
import org.beetl.sql.core.annotatoin.Version;
import org.beetl.sql.core.annotatoin.LogicDelete;
import com.sdx.common.utils.Utils;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;

/*
*
* gen by Spring Boot2 Admin 2020-04-30
*/
@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
@Data
public class BaseSuggest extends BaseEntity{

    //建议ID
    @NotNull(message = "ID不能为空", groups =ValidateConfig.UPDATE.class)
    @AutoID
    private Integer suggestId ;

    //建议标题
    private String title ;

    //建议描述
    private String describe ;

    //附件
    private String file ;

    //联系电话
    private String phone ;

    //是否公开[0-不公开 1-公开]
    private Integer isOpen ;

    //是否推荐[0-不推荐 1-推荐]
    private Integer isTop ;

    //会员ID
    private String customerId ;
	private String customerName ;

    //来源模块 14、公开课，15、圣达信教育，16、志愿填报，17、自主招生，18、艺考生
    private String module ;

    //来源渠道 miniprogram、自有微信小程序，h5、自有h5，gaosan、高三网app，h6、高三网h5引流
    private String channelCode ;

    //创建时间
    private Date createdTime ;

    private Integer status;

	private Integer updatedBy ;

	private String updatedName ;

	private Date updatedTime ;

	private String handleMemo;

	private String sourceId;
	@ColumnIgnore
	@JsonIgnore
	private String createdTimeQuery;
	@ColumnIgnore
	@JsonIgnore
	private Date createdTimeStart;
	@ColumnIgnore
	@JsonIgnore
	private Date createdTimeEnd;
	public String getCreatedTimeQuery(){
		return  createdTimeQuery;
	}
	public void setCreatedTimeQuery(String createdTimeQuery ){
		this.createdTimeQuery = createdTimeQuery;
		Date[] timePair = Utils.parseQueryTime(createdTimeQuery);
		if (timePair!=null && timePair[0]!=null) {
			this.createdTimeStart = timePair[0];
		}
		if (timePair!=null && timePair.length==2 && timePair[1]!=null) {
			this.createdTimeEnd = timePair[1];
		}

	}
	public Date getCreatedTimeStart(){
		return  createdTimeStart;
	}
	public void setCreatedTimeStart(Date createdTimeStart ){
		this.createdTimeStart = createdTimeStart;
	}
	public Date getCreatedTimeEnd(){
		return  createdTimeEnd;
	}
	public void setCreatedTimeEnd(Date createdTimeEnd ){
		this.createdTimeEnd = createdTimeEnd;
	}

}
